package com.fsc._enum;

import lombok.Getter;

/**
 * 返回结果枚举类2000为成功，
 * 4***表示权限问题（前端造成的），
 * 5000为系统问题（后端原因）
 */
@Getter
public enum ReturnEnum {

    SUCCESS(2000, "成功"),
    SUCCESS_REGISTER(2001, "注册成功"),
    SUCCESS_LOGIN(2002, "登录成功"),
    SUCCESS_LOGOUT(2003, "登出成功"),
    SUCCESS_SEND_CODE(2004, "发送成功,验证码五分钟内有效"),
    SUCCESS_UPLOAD(2020, "上传成功,3分钟有效"),
    SUCCESS_UPLOAD_PICTURE(2030,"图片上传成功"),
    //前端问题用4***排查
    FAIL(4000, "失败"),
    PERMISSION_FAILED(4001, "登录无效，请重新登录"),
    PARAM_FAILED(4002, "参数错误"),
    REGEX_FAILED(4003, "正则校验失败"),
    ACCOUNT_NULL(4004, "账号不存在"),
    ACCOUNT_PASSWORD_WRONG(4005, "账号或密码错误"),
    NOT_LOGIN(4006, "未登录或登录失效"),
    PHONE_PASSWORD_WRONG(4007,"手机号或密码错误" ),
    PHONE_NOT_EXIST(4008,"手机号不存在" ),
    PHONE_CODE_WRONG(4009,"验证码错误" ),
    PHONE_USER_EXIST(4010,"手机账号已存在，请前往登录" ),
    USERNAME_USER_EXIST(4011,"用户名已存在，请前往登录" ),
    PARAMETER_MISSING(4012,"参数缺失" ),
    UPLOAD_FAIL(4013,"上传失败或已失效，请重新上传" ),
    ANN_REPO_NEWS_NOT_EXIST(4040,"id不存在"),

    USER_NOT_EXIST(4051,"用户不存在"),
    //后端问题可以直接在控制台找到
    Not_Found(5001, "学生找不到"),
    SYSTEM_ERROR(5000, "系统错误");




    private final int code;
    private final String message;
    ReturnEnum(int code, String message) {
        this.code = code;
        this.message = message;
    }
}
